<template>
  <div :style="color" class="bnt">
    <p @click="select(bnts.tit)">
      {{ bnts.tit }}<span>{{ bnts.num }}</span>
    </p>
  </div>
</template>

<script>
export default {
  props: ["bnts"],

  data() {
    return {
      color: {
        backgroundColor: this.bnts.color,
        color: this.bnts.txt,
      },
    };
  },
  methods: {
    select(v) {
      this.$emit("select", v);
    },
  },
};
</script>

<style lang="less" scoped>
.bnt {
  display: inline-block;
  padding: 10px;
  margin-right: 10px;
}
</style>